<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: tSampler</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tSampler<div class="ingroups"><a class="el" href="group__sampling.html">Sampling</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Loopable input sampler with crossfading.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabe6b68ce1ad3be371e341671e131d8d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gabe6b68ce1ad3be371e341671e131d8d1">tSampler_init</a> (tSampler *const, tBuffer *const, <a class="el" href="struct_l_e_a_f.html">LEAF</a> *const leaf)</td></tr>
<tr class="memdesc:gabe6b68ce1ad3be371e341671e131d8d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tSampler to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance.  <a href="group__tsampler.html#gabe6b68ce1ad3be371e341671e131d8d1">More...</a><br /></td></tr>
<tr class="separator:gabe6b68ce1ad3be371e341671e131d8d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8294d4396e241ff583d5a0208a262a6f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#ga8294d4396e241ff583d5a0208a262a6f">tSampler_free</a> (tSampler *const)</td></tr>
<tr class="memdesc:ga8294d4396e241ff583d5a0208a262a6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a tSampler from its mempool.  <a href="group__tsampler.html#ga8294d4396e241ff583d5a0208a262a6f">More...</a><br /></td></tr>
<tr class="separator:ga8294d4396e241ff583d5a0208a262a6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf22e3192bf74770101ecae67268ed465"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gaf22e3192bf74770101ecae67268ed465">tSampler_tick</a> (tSampler *const)</td></tr>
<tr class="separator:gaf22e3192bf74770101ecae67268ed465"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf6e374c6d252d986b46415223980088e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gaf6e374c6d252d986b46415223980088e">tSampler_setSample</a> (tSampler *const, tBuffer *const)</td></tr>
<tr class="separator:gaf6e374c6d252d986b46415223980088e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7790cb700416a22238238fea75f0c632"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#ga7790cb700416a22238238fea75f0c632">tSampler_setMode</a> (tSampler *const, PlayMode mode)</td></tr>
<tr class="separator:ga7790cb700416a22238238fea75f0c632"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca8fd3a386f7b5c12584820b76be70b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gaca8fd3a386f7b5c12584820b76be70b6">tSampler_play</a> (tSampler *const)</td></tr>
<tr class="separator:gaca8fd3a386f7b5c12584820b76be70b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf3dd0f9013b69cf4c3a6199b674925c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gaf3dd0f9013b69cf4c3a6199b674925c0">tSampler_stop</a> (tSampler *const)</td></tr>
<tr class="separator:gaf3dd0f9013b69cf4c3a6199b674925c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac7dc95f6705399e73778c96904df2390"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gac7dc95f6705399e73778c96904df2390">tSampler_setStart</a> (tSampler *const, int32_t start)</td></tr>
<tr class="separator:gac7dc95f6705399e73778c96904df2390"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36696178ca3f0bc7b8eef6786fe81faa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#ga36696178ca3f0bc7b8eef6786fe81faa">tSampler_setEnd</a> (tSampler *const, int32_t end)</td></tr>
<tr class="separator:ga36696178ca3f0bc7b8eef6786fe81faa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga498ced8a867faef896eb7ed194f86040"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#ga498ced8a867faef896eb7ed194f86040">tSampler_setLength</a> (tSampler *const, int32_t length)</td></tr>
<tr class="separator:ga498ced8a867faef896eb7ed194f86040"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3b3bdfaff5b05513c777a586ad7fac5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gaa3b3bdfaff5b05513c777a586ad7fac5">tSampler_setCrossfadeLength</a> (tSampler *const sp, uint32_t length)</td></tr>
<tr class="separator:gaa3b3bdfaff5b05513c777a586ad7fac5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadaccb8d16c9870ba327b4ab51ebc3b7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tsampler.html#gadaccb8d16c9870ba327b4ab51ebc3b7e">tSampler_setRate</a> (tSampler *const, float rate)</td></tr>
<tr class="separator:gadaccb8d16c9870ba327b4ab51ebc3b7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Loopable input sampler with crossfading. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gabe6b68ce1ad3be371e341671e131d8d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabe6b68ce1ad3be371e341671e131d8d1">&#9670;&nbsp;</a></span>tSampler_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_init </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_l_e_a_f.html">LEAF</a> *const&#160;</td>
          <td class="paramname"><em>leaf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a tSampler to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the tSampler to initialize. </td></tr>
    <tr><td class="paramname">buffer</td><td>A pointer to a tBuffer to playback audio from. Multiple tSamplers can share one tBuffer. </td></tr>
    <tr><td class="paramname">leaf</td><td>A pointer to the leaf instance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8294d4396e241ff583d5a0208a262a6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8294d4396e241ff583d5a0208a262a6f">&#9670;&nbsp;</a></span>tSampler_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_free </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free a tSampler from its mempool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the tSampler to free. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf22e3192bf74770101ecae67268ed465"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf22e3192bf74770101ecae67268ed465">&#9670;&nbsp;</a></span>tSampler_tick()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float tSampler_tick </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf6e374c6d252d986b46415223980088e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf6e374c6d252d986b46415223980088e">&#9670;&nbsp;</a></span>tSampler_setSample()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_setSample </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7790cb700416a22238238fea75f0c632"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7790cb700416a22238238fea75f0c632">&#9670;&nbsp;</a></span>tSampler_setMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_setMode </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PlayMode&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaca8fd3a386f7b5c12584820b76be70b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaca8fd3a386f7b5c12584820b76be70b6">&#9670;&nbsp;</a></span>tSampler_play()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_play </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf3dd0f9013b69cf4c3a6199b674925c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf3dd0f9013b69cf4c3a6199b674925c0">&#9670;&nbsp;</a></span>tSampler_stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_stop </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac7dc95f6705399e73778c96904df2390"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac7dc95f6705399e73778c96904df2390">&#9670;&nbsp;</a></span>tSampler_setStart()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_setStart </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>start</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga36696178ca3f0bc7b8eef6786fe81faa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga36696178ca3f0bc7b8eef6786fe81faa">&#9670;&nbsp;</a></span>tSampler_setEnd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_setEnd </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga498ced8a867faef896eb7ed194f86040"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga498ced8a867faef896eb7ed194f86040">&#9670;&nbsp;</a></span>tSampler_setLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_setLength </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa3b3bdfaff5b05513c777a586ad7fac5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa3b3bdfaff5b05513c777a586ad7fac5">&#9670;&nbsp;</a></span>tSampler_setCrossfadeLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_setCrossfadeLength </td>
          <td>(</td>
          <td class="paramtype">tSampler *const&#160;</td>
          <td class="paramname"><em>sp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gadaccb8d16c9870ba327b4ab51ebc3b7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadaccb8d16c9870ba327b4ab51ebc3b7e">&#9670;&nbsp;</a></span>tSampler_setRate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tSampler_setRate </td>
          <td>(</td>
          <td class="paramtype">tSampler * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>rate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tSampler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
